#{extends 'mana-main.html' /}
#{set adActive :"active" /}
#{set title :"设置广告" /}
<br>
<br>
<br>
<br>
<br>
<div class="block-content">
    <form  method = "post" action="@{Activities.uploadAdvertisementPhoto}" enctype="multipart/form-data">

        <div class="form-group">
            <span class="help-block">图片格式暂时只支持PNG, JPG</span>

            <label for="exampleInputFile">请选择一张图片</label>
            <input type="file" name="image" id="multi-file" multiple/>
            <br/>
            <button type="submit" class="btn btn-default">确定</button>
        </div>
    </form>
</div>
<table class="table table-bordered white">
    <tbody><tr>
        <th>预览</th>
        <th>图片id</th>
        <th width="15%">删除</th>
    </tr>

    #{if webServiceBean.data}
        #{list items: webServiceBean.data,as :'photo'}
        <tr>
            <td class="td">
                <img src="../${photo.url}" alt="0" class="tableimg"  width="200px"/>
            </td>
            <td>${photo.id}</td>
            <td class="td">
                <a class="btn btn-danger" href="@{Activities.deleteAdvertisement(photo.id)}">删除</a>
            </td>
        </tr>
        #{/list}
    #{/if}


    </tbody></table>
#{page pageBean: pageBean, params : params/}